package config

// AppConfig 应用程序配置
var AppConfig = struct {
	AppName  string
	Debug    bool
	Timezone string
}{}

// DBConfig 数据库配置
var DBConfig = struct {
	Driver       string
	Host         string
	Port         int
	Database     string
	Username     string
	Password     string
	Charset      string
	Collation    string
	Prefix       string
	MaxOpenConns int
	MaxIdleConns int
}{}

// LoadConfig 加载配置
func LoadConfig() {
	// 简化版本，实际项目中可以从配置文件中读取
	AppConfig.AppName = "ThinkGo"
	AppConfig.Debug = true
	AppConfig.Timezone = "Asia/Shanghai"

	DBConfig.Driver = "mysql"
	DBConfig.Host = "127.0.0.1"
	DBConfig.Port = 3306
	DBConfig.Database = "hrzs" // 请确保数据库已创建
	DBConfig.Username = "root"
	DBConfig.Password = "root"
	DBConfig.Charset = "utf8mb4"
	DBConfig.Collation = "utf8mb4_unicode_ci"
	DBConfig.Prefix = "hrzs_"
	DBConfig.MaxOpenConns = 100
	DBConfig.MaxIdleConns = 20
}
